<?php

class order_discounts extends a_dynamic_prop {

    public function get_property_name(){
        return $this->_prefix()."discounts";
    }

    public function run( i_base_model $caller){         
        if($caller->id!==NULL){
            $order_service = new service_l_order();            
            return $order_service->get_order_discounts($caller->id);
        }else{
            return NULL;
        }
    }

    public function for_model(){
        return "order_m_order";
    }

    public function run_once(){
        return FALSE;
    }
}
?>